/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.f1x.api.message.fields;

// Generated by org.f1x.tools.DictionaryGenerator from QuickFIX dictionary
public enum QuoteRequestRejectReason implements org.f1x.api.message.types.IntEnum {
	UNKNOWN_SYMBOL(1),
	EXCHANGE_CLOSED(2),
	QUOTE_REQUEST_EXCEEDS_LIMIT(3),
	TOO_LATE_TO_ENTER(4),
	INVALID_PRICE(5),
	NOT_AUTHORIZED_TO_REQUEST_QUOTE(6),
	NO_MATCH_FOR_INQUIRY(7),
	NO_MARKET_FOR_INSTRUMENT(8),
	NO_INVENTORY(9),
	PASS(10),
	OTHER(99);

	private final int code;

	QuoteRequestRejectReason (int code) {
		this.code  = code;
	}

	public int getCode() { return code; }

	public static QuoteRequestRejectReason parse(String s) {
		switch(s) {
			case "1" : return UNKNOWN_SYMBOL;
			case "2" : return EXCHANGE_CLOSED;
			case "3" : return QUOTE_REQUEST_EXCEEDS_LIMIT;
			case "4" : return TOO_LATE_TO_ENTER;
			case "5" : return INVALID_PRICE;
			case "6" : return NOT_AUTHORIZED_TO_REQUEST_QUOTE;
			case "7" : return NO_MATCH_FOR_INQUIRY;
			case "8" : return NO_MARKET_FOR_INSTRUMENT;
			case "9" : return NO_INVENTORY;
			case "10" : return PASS;
			case "99" : return OTHER;
		}
		return null;
	}

}